<script>
function failure(message){
	box_failure = new LightFace({ 
			title: 'Failure', 
			width : 300,
			content: "<div class='failure'>"+message+"</div>"
			,
			buttons: [{ title: 'Cancel', event: function() { this.close();}, color: 'green'}]
		});
		box_failure.open();		
}
function box_message(titleMessage,message){
	box_message = new LightFace({ 
			title: titleMessage, 
			width : 300,
			content: "<div class='message'>"+message+"</div>"
			,
			buttons: [{ title: 'Cancel', event: function() { this.close();}, color: 'blue'}]
		});
		box_message.open();		
}
//---------------------------------------------------------------------------------------------------->>>> album
function showAlbum(){
	var myRequest = new Request({
		url: '<?php echo site_url(array('member','showAlbum'))?>',
		method: 'post',
		onSuccess : function(responseText){
			$('showAlbum').innerHTML = responseText;
		}
	}).send();
}
function saveAlbum(form, evt){
	new Event(evt).stop();
	form = $(form);
//	alert($(document.forms[0]).name.value);
		form.set('send', {url:'<?php echo site_url('project/saveAlbum')?>', method:'post',
				 	onSuccess: function(responseText, responseXML){
						box_album.close();
						showAlbum();
					},
					onComplete: function(){
						
					},
					onFailure: function(xhr){
						var message = "Failed to save";
						failure(message);
					}
				});
		form.send();
	
	return false;
}

//---------------------------------------------------------------------------------------------------->>>> formcheck
window.addEvent('domready',function(){
	showAlbum();
	new FormCheck('formAlbum', {
		display : {
			errorsLocation : 1,
			showErrors : 1,
			addClassErrorToField : 1
		}
	});
});
</script>
<table bgcolor="#CCCCCC" width="755" border="0" cellspacing="1" cellpadding="0"  id="project">
  <tr>
    <td align="center">
     <table bgcolor="#F8F8F8" height="300" width="100%" border="0" cellspacing="5" cellpadding="10">
      <tr height="500" valign="top">
       <td>
       	  <table border="0" cellpadding="3" cellspacing="2">
     	  <tr><td>Info</td></tr>
          </table>
       </td>
      </tr>
     </table>
    </td>
  </tr>
</table>